<template>
    <div class='form_title'>
        {{label}}{{title}}
    </div>
</template>
<script>
export default {
    name:'form_title',
    props:['label','data','index','dataField','id'],
    data(){
        return{
            title:""
        }
    },
    created(){
       
        this.title=this.data[this.dataField][this.index][this.id]
    },
     watch:{
          data:{
            handler: function (newVal) {
                 this.title=this.data[this.dataField][this.index][this.id]
            },      
            deep: true    //深度监听
        }
     }
   
}
</script>
<style scoped>
    .form_title{
        text-align:center;
        font-size:26px;
        color:crimson;
        width:100%;
    }
</style>